home *** CD-ROM | disk | FTP | other *** search
- /************************************************************************************************/
- /* */
- /* Module Name: HSGetDTMF */
- /* */
- /* File Name: HSGetDTMF.c */
- /* */
- /* © Apple Computer, Inc. 1994-1995 */
- /* All Rights Reserved */
- /* */
- /* Revision History: */
- /* */
- /* Date Who Modification */
- /* */
- /* 1994-07-29 Jaakko Railo Original version */
- /* */
- /************************************************************************************************/
-
- /****************************************** DESCRIPTION ******************************************
-
- *************************************************************************************************/
-
- /******************************************** HEADERS *******************************************/
-
- #ifndef __TELEPHONES__
- #include "Telephones.h"
- #endif
-
- #include "TestModule.h"
-
- /****************************************** DEFINITIONS *****************************************/
-
- #define kDTMFOn 1
- #define kDTMFOff 0
-
- /****************************************** PROTOTYPES ******************************************/
-
- void DoTest (CHRSPtr paramPtr);
-
- /************************************************************************************************/
- /************************************************************************************************/
-
-
- pascal short TestModule (CHRSPtr paramPtr)
- {
- short returnValue = noErr;
-
- if (paramPtr->version <= kTestModuleVersion) {
-
- DoTest (paramPtr);
-
- }
- else
- returnValue = kWrongVersion;
-
- return (returnValue);
- }
-
-
- void DoTest (CHRSPtr paramPtr)
- {
- TELHandle termHand = GetCurrentTELHandle (paramPtr);
- OSErr errCode;
- Boolean dtmf;
-
- if ((errCode = TELHSGetDTMF (termHand, &dtmf)) == noErr)
- Print (paramPtr, "TELHSGetDTMF --> DTMF = %s",
- ((dtmf==kDTMFOn)?"DTMFOn":"DTMFOff"));
- else
- Print (paramPtr, "### TELHSGetDTMF failed : %d", errCode);
- }
-
-
-